// Achievement made by Dark Shadow [DK]
// Modified by RabidToaster

local target = ( 60 * 60 * 24 ) * 7
local time = math.min( achievements.GetValue( "Playtime", "total", 0 ), target )

local function Update()
	time = math.min( achievements.GetValue( "Playtime", "total", time ), target )
	
	if ( time >= target ) then
		timer.Destroy( "Achievements.PlaytimeOneWeek" )
	end
	
	achievements.Update( "Playtime - One Week", time / target, achievements.FormatTime( time, "h:m:s" ) )
end
timer.Create( "Achievements.PlaytimeOneWeek", 1, 0, Update )

achievements.Register( "Playtime - One Week", "Spend a total of one week (168h) playing GMod.", "achievements/playtime_7", time / target, achievements.FormatTime( time, "h:m:s" ) )